package com.hc.tenant.listener;

import com.hc.tenant.listener.event.MqttEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class MqttEvenPublisher {

    @Autowired
    private List<MqttEventListener> listenerList;

    public void mqttEventPublish(MqttEvent mqttEvent){
        for(MqttEventListener listener : listenerList){
            listener.onMqttEvent(mqttEvent);
        }
    };
}
